:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

.card {
  padding: 2em;
}

#app {
  background-color: #d8ae8c;
  flex: 1;
  padding: 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}

/* 容器样式 */
.container {
  border-radius: 12px;
  background-color: #f8f9fa;
  flex: 1;
  width: 80%;
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: center;
  overflow: hidden;
}

/* 编辑器控制面板样式 */
.editor-controls {
  height: 80vh;
  width: 400px;
  padding: 25px;
  background-color: #f5f5f5;
  overflow-y: scroll;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 15px;
  scrollbar-width: thin;
  scrollbar-color: #888 #f5f5f5;
}

.editor-controls::-webkit-scrollbar {
  width: 8px;
}

.editor-controls::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.editor-controls::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.editor-controls::-webkit-scrollbar-thumb:hover {
  background: #666;
}

/* 控制组样式 */
.control-group {
  background-color: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.group-header {
  cursor: pointer;
}

.control-group:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 按钮组样式 */
.button-group {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.button-group button {
  padding: 8px 12px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.button-group button:hover {
  background-color: #45a049;
  transform: translateY(-1px);
}

/* 标题和内容样式 */
.control-group h3 {
  margin: 0 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #4caf50;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

/* 列表样式 */
.inner-circle-list,
.company-list,
.stamp-type-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inner-circle-item,
.company-item,
.stamp-type-item {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  transition: all 0.3s ease;
}

.inner-circle-item:hover,
.company-item:hover,
.stamp-type-item:hover {
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 表单控件样式 */
.editor-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #555;
}

.editor-controls input[type='text'],
.editor-controls input[type='number'],
.editor-controls select {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.editor-controls input[type='text']:focus,
.editor-controls input[type='number']:focus,
.editor-controls select:focus {
  border-color: #4caf50;
  outline: none;
}

/* 滑块样式 */
.editor-controls input[type='range'] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  outline: none;
}

.editor-controls input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #4caf50;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
}

.editor-controls input[type='range']::-webkit-slider-thumb:hover {
  background: #45a049;
}

/* 复选框样式 */
.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  cursor: pointer;
}

.checkbox-label input[type='checkbox'] {
  margin-right: 8px;
  cursor: pointer;
}

/* 按钮样式 */
.add-button,
.delete-button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-button {
  background-color: #4caf50;
  width: 100%;
  margin-top: 8px;
}

.delete-button {
  background-color: #dc3545;
}

.add-button:hover {
  background-color: #45a049;
}

.delete-button:hover {
  background-color: #c82333;
}

/* 标题栏样式 */
.inner-circle-header,
.company-header,
.stamp-type-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

/* Canvas 容器样式 */
.canvas-container {
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow: hidden;
}

canvas {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
  background-color: white;
}

/* 模板面板样式 */
.template-panel {
  width: 300px;
  background: #fff;
  border-left: 1px solid #eee;
  display: flex;
  flex-direction: column;
  height: 80vh;
}

.template-header {
  padding: 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-header h3 {
  margin: 0;
  color: #333;
}

.add-template {
  background: #4caf50;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.template-list {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.template-item {
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.template-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.template-item.active {
  border-color: #4caf50;
  box-shadow: 0 0 0 2px rgba(76,175,80,0.2);
}

.template-preview {
  height: 150px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: #f5f5f5;
}

.template-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.template-info {
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-name {
  font-size: 14px;
  color: #333;
}

.template-actions {
  display: flex;
  gap: 8px;
}

.delete-template {
  background: #ff4d4f;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.delete-template:hover {
  background: #ff7875;
}

/* Tab 样式 */
.tab-navigation {
  display: flex;
  gap: 2px;
  background: #f0f0f0;
  padding: 2px;
  border-radius: 8px;
  margin-bottom: 15px;
  position: sticky;
  top: 60px;
  z-index: 1000;
}

.tab-button {
  flex: 1;
  padding: 10px;
  border: none;
  background: #fff;
  color: #666;
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.tab-button:hover {
  background: #e8f5e9;
  color: #4caf50;
}

.tab-button.active {
  background: #4caf50;
  color: white;
}

/* 模板分类样式 */
.template-category {
  margin-bottom: 20px;
}

.template-category h4 {
  margin: 0 0 10px 0;
  color: #666;
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}



/* 修改法律免责说明样式 */
.legal-disclaimer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background-color: rgba(255, 241, 240, 0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 12px 20px;
  transition: all 0.3s ease;
}

.disclaimer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.warning-icon {
  font-size: 24px;
  color: #ff4d4f;
  flex-shrink: 0;
}

.warning-text {
  flex: 1;
}

.warning-text h3 {
  color: #ff4d4f;
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: bold;
}

.warning-text p {
  color: #cf1322;
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.5;
}

.warning-text strong {
  font-size: 16px;
}

/* 添加法律提示弹窗样式 */
.legal-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2100;
}

.legal-dialog {
  background-color: white;
  padding: 24px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.legal-dialog h3 {
  color: #ff4d4f;
  margin: 0 0 16px 0;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-content {
  margin-bottom: 20px;
}

.legal-content p {
  color: #cf1322;
  margin-bottom: 12px;
}

.legal-content ol {
  color: #666;
  padding-left: 20px;
  margin: 0;
}

.legal-content li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.cancel-button,
.confirm-button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.cancel-button {
  background-color: #f5f5f5;
  color: #666;
}

.confirm-button {
  background-color: #4caf50;
  color: white;
}

.cancel-button:hover {
  background-color: #e8e8e8;
}

.confirm-button:hover {
  background-color: #45a049;
}


.image-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.image-item {
  border: 1px solid #ddd;
  padding: 12px;
  border-radius: 6px;
  background: #f8f9fa;
}

.image-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.image-preview {
  width: 100px;
  height: 100px;
  margin: 10px auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}